package com.example.noelwhereismystuffs.presenters;

import java.util.ArrayList;

import com.example.noelwhereismystuffs.models.IReportItemModel;
import com.example.noelwhereismystuffs.models.Item;
import com.example.noelwhereismystuffs.models.User;
import com.example.noelwhereismystuffs.views.ReportItemsActivity.IReportItemsView;

public class ReportItemsPresenter {
	private IReportItemsView myView;
	private IReportItemModel myModel;
	@SuppressWarnings("unused")
	private User myUser;

	public ReportItemsPresenter(IReportItemsView view, IReportItemModel model) {
		myView = view;
		myModel = model;
	}

	/**
	 * Tell the model to add new items
	 * 
	 * @param owner
	 * @param itemType
	 * @param itemName
	 * @param itemLocation
	 * @param category 
	 */
	public void addNewItem(User owner, String itemType, String itemName,
			String itemLocation, String category, String date) {
		myUser = owner;
		ArrayList<Item> itemList = myModel.addNewItem(owner, itemType, itemName, itemLocation, category, date);
		myView.advanceReport(itemList);
	}

}
